'\" te
.\" Copyright (c) 2008, Sun Microsystems Inc. All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH DLPI_WALK 3DLPI "Sep 18, 2008"
.SH NAME
dlpi_walk \- traverse DLPI links
.SH SYNOPSIS
.LP
.nf
\fBcc\fR [ \fIflag\fR... ] \fIfile\fR... -\fBldlpi\fR [ \fIlibrary\fR... ]
#include <libdlpi.h>

\fBvoid\fR \fBdlpi_walk\fR(\fBdlpi_walkfunc_t *\fR\fIfn\fR, \fBvoid *\fR\fIarg\fR, \fBuint_t\fR \fIflags\fR);
.fi

.LP
.nf
\fBtypedef boolean_t\fR \fBdlpi_walkfunc_t\fR(\fBconst char *\fR\fIname\fR, \fBvoid *\fR\fIarg\fR);
.fi

.SH PARAMETERS
.sp
.ne 2
.na
\fB\fIfn\fR\fR
.ad
.RS 13n
Function to invoke for each link.  Arguments are:
.sp
.ne 2
.na
\fB\fIname\fR\fR
.ad
.RS 8n
The name of the DLPI interface.
.RE

.sp
.ne 2
.na
\fB\fIarg\fR\fR
.ad
.RS 8n
The \fIarg\fR parameter passed in to \fBdlpi_walk()\fR.
.RE

.RE

.sp
.ne 2
.na
\fB\fIarg\fR\fR
.ad
.RS 13n
An opaque argument that is passed transparently to the user-supplied \fIfn\fR()
function.
.RE

.sp
.ne 2
.na
\fB\fIflags\fR\fR
.ad
.RS 13n
This parameter is reserved for future use. The caller should pass in 0.
.RE

.SH DESCRIPTION
.sp
.LP
The \fBdlpi_walk()\fR function visits all DLPI links on the system.  For each
link visited, the user-supplied fn() function is invoked. The walk terminates
either when all links have been visited or when \fIfn\fR() returns
\fBB_TRUE\fR.
.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(7) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Interface Stability	Committed
_
MT-Level	Safe
.TE

.SH SEE ALSO
.sp
.LP
.BR libdlpi (3LIB),
.BR attributes (7)
